<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SendMode</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>SendMode <span class="ver">[v1.0.43+]</span></h1>

<p>Makes <a href="Send.htm">Send</a> synonymous with SendInput or SendPlay rather than the default (SendEvent). Also makes Click and MouseMove/Click/Drag use the specified method.</p>

<pre class="Syntax">SendMode Input|Play|Event|InputThenPlay</pre>
<p>The first parameter is one of the following words:</p>
<p><strong>Event</strong>: This is the starting default used by all scripts. It uses the <a href="Send.htm#SendEvent">SendEvent</a> method for <a href="Send.htm">Send</a>, <a href="Send.htm">SendRaw</a>, <a href="Click.htm">Click</a>, and <a href="MouseMove.htm">MouseMove</a>/<a href="MouseClick.htm">Click</a>/<a href="MouseClickDrag.htm">Drag</a>.</p>
<p><strong>Input</strong>: Switches to the <a href="Send.htm#SendInput">SendInput</a> method for <a href="Send.htm">Send</a>, <a href="Send.htm">SendRaw</a>, <a href="Click.htm">Click</a>, and <a href="MouseMove.htm">MouseMove</a>/<a href="MouseClick.htm">Click</a>/<a href="MouseClickDrag.htm">Drag</a>. Known limitations:</p>
<ul>
  <li>Windows Explorer ignores SendInput's simulation of certain navigational hotkeys such as Alt+LeftArrow. To work around this, use either <code>SendEvent !{Left}</code> or <code>SendInput {Backspace}</code>.</li>
</ul>
<p><strong>InputThenPlay</strong> <span class="ver">[v1.0.43.02+]:</span> Same as above except that rather than falling back to Event mode when SendInput is <a href="Send.htm#SendInputUnavail">unavailable</a>, it reverts to Play mode (below). This also causes the <a href="Send.htm#SendInput">SendInput command</a> itself to revert to Play mode when SendInput is unavailable.</p>
<p><strong><a name="Play"></a>Play</strong>: Switches to the <a href="Send.htm#SendPlay">SendPlay</a> method for <a href="Send.htm">Send</a>, <a href="Send.htm">SendRaw</a>, <a href="Click.htm">Click</a>, and <a href="MouseMove.htm">MouseMove</a>/<a href="MouseClick.htm">Click</a>/<a href="MouseClickDrag.htm">Drag</a>.<br>
Known limitations:</p>
<ul>
  <li>Characters that do not exist in the current keyboard layout (such as &Ocirc; in English) cannot be sent. To work around this, use <a href="Send.htm#SendEvent">SendEvent</a>.</li>
  <li>Simulated mouse dragging might have no effect in RichEdit controls (and possibly others) such as those of WordPad and Metapad. To use an alternate mode for a particular drag, follow this example: <code><a href="Send.htm#SendEvent">SendEvent</a> {Click 6, 52, down}{Click 45, 52, up}</code>.</li>
  <li>Simulated mouse wheel rotation produces movement in only one direction (usually downward, but upward in some applications). Also, wheel rotation might have no effect in applications such as MS Word and Notepad. To use an alternate mode for a particular rotation, follow this example: <code><a href="Send.htm#SendEvent">SendEvent</a> {WheelDown 5}</code>.</li>
  <li>When using <code>SendMode Play</code> in the auto-execute section (top part of the script), all remapped keys are affected and might lose some of their functionality. See <a href="../misc/Remap.htm#SendPlay">SendPlay remapping limitations</a> for details.</li>
  <li>SendPlay does not trigger AutoHotkey's hotkeys or hotstrings, or global hotkeys registered by other programs or the OS.</li>
</ul>
<h3>Remarks</h3>
<p>Since SendMode also changes the mode of <a href="Click.htm">Click</a> and <a href="MouseMove.htm">MouseMove</a>/<a href="MouseClick.htm">Click</a>/<a href="MouseClickDrag.htm">Drag</a>, there may be times when you wish to use a different mode for a particular mouse event. The easiest way to do this is via <a href="Send.htm#Click">{Click}</a>. For example:</p>
<pre>SendEvent {Click 100, 200}  <em>; SendEvent uses the older, traditional method of clicking.</em></pre>
<p>If SendMode is used in the auto-execute section (top part of the script), it also affects <a href="../misc/Remap.htm">keyboard and mouse remapping</a>. In particular, if you use <code>SendMode Play</code> with remapping, see <a href="../misc/Remap.htm#SendPlay">SendPlay remapping limitations</a>.</p>
<p>Every newly launched <a href="../misc/Threads.htm">thread</a> (such as a <a href="../Hotkeys.htm">hotkey</a>, <a href="Menu.htm">custom menu item</a>, or <a href="SetTimer.htm">timed</a> subroutine) starts off fresh with the default setting for this command. That default may be changed by using this command in the auto-execute section (top part of the script).</p>
<h3>Related</h3>
<p><a href="Send.htm">Send</a>, <a href="SetKeyDelay.htm">SetKeyDelay</a>, <a href="SetMouseDelay.htm">SetMouseDelay</a>, <a href="Click.htm">Click</a>, <a href="MouseClick.htm">MouseClick</a>, <a href="MouseClickDrag.htm">MouseClickDrag</a>, <a href="MouseMove.htm">MouseMove</a></p>
<h3>Examples</h3>
<pre class="NoIndent">SendMode Input
SendMode InputThenPlay</pre>

</body>
</html>
